package com.hushan.elevator.service;

import com.hushan.elevator.model.DeviceInfo;
import com.hushan.elevator.model.DeviceLog;
import com.hushan.elevator.vo.LogInfoVo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface DeviceLogService {
    Page<LogInfoVo> findAllDeviceLogs(Pageable pageable);

    DeviceLog findDeviceLogById(Integer id);

    Page<LogInfoVo> findDeviceLogsByDeviceId(String deviceSerial,Pageable pageable);

    void online(DeviceInfo deviceInfo,int isOnline);

    void onMessage(DeviceInfo deviceInfo, String msg);

    void onWarning(String devid, String eventId, String warningType,String detail);

    void onCapture(String devid, String eventId);

    void onConnect(DeviceInfo deviceInfo);

    void onDisConnect(DeviceInfo deviceInfo);

    void onError(String devid, String logMessage ,String detail);

    List<LogInfoVo> convertRiskRecordDto(List<Object[]> raws);
}
